<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<title>app</title>
		<link href="css/weui.min.css" rel="stylesheet" />
		<link href="css/jquery-weui.min.css" rel="stylesheet" />
		<link href="fonts/iconfont.css" rel="stylesheet" />
		<link href="css/style.css" rel="stylesheet" />
		<script src="js/immersed.js"></script>
</head>

	<body>
		<style>
			body {
				background-color: #000;
				color: #fff
			}
			
			.main-body {
				position: fixed;
				top: 44px;
				bottom: 0;
				width: 100%;
				overflow-x: hidden;
				overflow-y: auto;
				-webkit-overflow-scrolling: touch;
			}
			
			.back-btn{
				position: absolute;
				z-index: 1000;
				top: 40px;
				width: 35px;
				height: 35px;
				border-radius: 50%;
				background-color: rgba(0, 0, 0, 0.5);
				display: block;
				text-align: center;
				line-height: 38px;
				color: #fff;
			}
			
			.back-btn {
				left: 20px;
			}
			
			.back-btn i {
				font-size: 20px;
			}
			
			.share-btn,
			.down-btn
			{
				position: absolute;
				z-index: 1000;
				top: 40px;
				right:20px;
				width: 35px;
				height: 35px;
				border-radius: 50%;
				background-color: rgba(0, 0, 0, 0.5);
				/*background-color: #0086B3;*/
				display: block;
				text-align: center;
				line-height: 35px;
				color: #fff;
			}
			
			.down-btn{
				right:70px
			}
			
			.share-btn i,
			.down-btn i{
				font-size:20px;
			}
		</style>

		<div style="text-align: center;margin-top: 200px;color: #999;">
			<div class="weui-infinite-scroll">
				<div class="infinite-preloader"></div>
			</div>
		</div>
		
		<a href="javascript:;" class="back-btn" onclick="wsClose();"><i class="iconfont icon-close"></i></a>
		
		<div class="share-btn" onclick="share()">
			<i class="iconfont icon-share"></i>
		</div>
		
		<div class="down-btn" onclick="download()">
			<i class="iconfont icon-down"></i>
		</div>
		
		<script src="js/mui.min.js"></script>
		<script src="js/jquery-2.1.4.js"></script>
		<script src="js/jquery-weui.min.js"></script>
		<script src="js/common.js"></script>
		<script src="js/swiper.min.js"></script>
		<script src="js/systemShare.js"></script>
		<script src="js/md5.min.js"></script>
		<script src="js/smarge.js"></script>
		<script>
			mui.init({ 
				swipeBack: false,
				gestureConfig: {
					tap: false, //默认为true
					doubletap: false, //默认为false
					longtap: true, //默认为false
					swipe: false, //默认为true
					drag: false, //默认为true
					hold: false, //默认为false，不监听
					release: false //默认为false，不监听
				}
			});
			var GoodsInfo = Smarge.get('GoodsInfo');
			var pics = GoodsInfo.pics;
			var activeImg = pics[0];
			var goods = [];
			
			pics.map(function(v,i){
				goods.push({image:v,caption:GoodsInfo.text});
			})
			
			
			mui.plusReady(function() {
				// 关闭侧滑返回功能
				var wv = plus.webview.currentWebview();
				wv.setStyle({ 'popGesture': 'none' });
				
				
				var photos = $.photoBrowser({
					items: goods,
					initIndex: 0,
					onSlideChange:function(index){
						activeImg = pics[index]
					},
					onClose: function() { wsClose() }
				});

				photos.open();

			});

			
			function share(){
				jushiShare.share([activeImg])
			}
			
			
			function download(){
				SaveImg(activeImg)
			}


		</script>

	</body>

</html>